#ifndef HLINK_ZONE_H
#define HLINK_ZONE_H

typedef enum {
    LOGRECORD_ZONE = 0,
    FILEMNGR_ZONE,
    CERT_ZONE,
    WIFI_802_1X_ZONE,
    MOBILE_APP_AUTH_ZONE,
    COPHER_ZONE,
    WIFI_CONF_ZONE,
    GW_CONF_ZONE,
    APP_MAC_ZONE
}zone_id;

typedef struct {
    zone_id id;
    unsigned int start_address;
	unsigned int last_address;
    unsigned int end_address;
}zone_info;


zone_info *zone_get(zone_id id);
int zone_erase_sector(zone_id id, unsigned int address, int length);
int zone_erase(zone_id id, int length);
int zone_write(zone_id id, unsigned int address,
               const unsigned char *buffer, unsigned int length);
int zone_read(zone_id id, unsigned int address,
              const unsigned char *buffer, unsigned int length);

#endif
